/******************* 公共变量 *******************/
var type = core.getUrlData('type');

/******************* Vue初始化代码 *******************/
var vm = new Vue({
	el: '.wrap',
	data: {
		rule: '',
		level: '',
		about: '',
		type: type
	},
	methods: {
		
	},
	computed: {
		
	},
	components: {
		
	},
	created: function () {
		var _this = this;
		$.ajax({
			url: levelUrl,
			type: 'post',
			success: function(data) {
				console.log(data)
				console.log(data.list)

				for (var i = 0; i < data.list.length; i++) {
					if (data.list[i].type == 'rule') {
						_this.rule = data.list[i].content;
					} else if (data.list[i].type == 'dengji') {
						_this.level = data.list[i].content;
					} else if (data.list[i].type == 'guanyu') {
						_this.about = data.list[i].content;
					}
				}
			}
		});
	},
	mounted: function () {
		common.bindBack();
		$('title').html((type == 'about') ? '关于' : (type == 'disclaimer' ? '免责声明' : '活动规则 | 等级攻略'));
	},
	updated: function () {
		$('html body .wrap .invite-help section table').before('<p><br></p>');
	}
});

